//
//  TravelModel.m
//  A段项目
//
//  Created by 刘言松 on 15/10/8.
//  Copyright (c) 2015年 刘言松. All rights reserved.
//

#import "TravelModel.h"

@implementation TravelModel
 

- (void)encodeWithCoder:(NSCoder *)aCoder{
    [aCoder encodeObject:self.cover_image forKey:@"cover_image"];
    [aCoder encodeObject:self.travel_id forKey:@"travel_id"];
    [aCoder encodeObject:self.name forKey:@"name"];
    [aCoder encodeObject:self.first_day forKey:@"first_day"];
    [aCoder encodeObject:self.day_count forKey:@"day_count"];
    [aCoder encodeObject:self.view_count forKey:@"view_count"];
    [aCoder encodeObject:self.popular_place_str forKey:@"popular_place_str"];
    [aCoder encodeObject:self.user_name forKey:@"user_name"];
    [aCoder encodeObject:self.user_avatar forKey:@"user_avatar"];
}

-(id)initWithCoder:(NSCoder *)aDecoder{
    
    self = [super init];
    if (self) {
        self.cover_image = [aDecoder decodeObjectForKey:@"cover_image"];
        self.travel_id = [aDecoder decodeObjectForKey:@"travel_id"];
        self.name = [aDecoder decodeObjectForKey:@"name"];
        self.first_day = [aDecoder decodeObjectForKey:@"first_day"];
        self.day_count = [aDecoder decodeObjectForKey:@"day_count"];
        self.view_count = [aDecoder decodeObjectForKey:@"view_count"];
        self.popular_place_str = [aDecoder decodeObjectForKey:@"popular_place_str"];
        self.user_name = [aDecoder decodeObjectForKey:@"user_name"];
        
        self.user_avatar = [aDecoder decodeObjectForKey:@"user_avatar"];
    }
    return self;
}

- (void)setValue:(id)value forUndefinedKey:(NSString *)key
{
    
  
}
@end
